import '../less/index.css'
import '../less/iconfont.less'
// import '@babel/polyfill'
import name from './module.js'

console.log(new Date());
console.log("hot!!!")
console.log(new Date())

if (module.hot) {
    module.hot.accept('./module', () => {
        console.log("name：");
        console.log(name);
    })
}

const p = function () {
    return new Promise((resolve, reject) => {
        const time = Math.random();
        if (time >= 0.5) {
            resolve(time + ' >= 0.5');
        } else {
            reject(time + ' < 0.5');
        }
    })
}

p().catch(res => {
    console.log(res);
}).then(err => {
    console.log(err);
})